package com.ktjy.crm;

import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import redis.clients.jedis.Jedis;

public class JedisTester {
    private Jedis jedis;

    @BeforeEach
    public void setup(){
        jedis=new Jedis("127.0.0.1",6379);
    }

    @Test
    public void testString(){
        jedis.set("name","ktjiaoyu");
        System.out.println(jedis.get("name"));

        jedis.append("name","czkt");
        System.out.println(jedis.get("name"));

        jedis.del("name");
        System.out.println(jedis.get("name"));

        jedis.mset("name","ktjiaoyu","age","18","add","cz");
        jedis.incr("age");
        System.out.println(jedis.get("name")+"-"+jedis.get("age")+"-"+jedis.get("add"));
    }
}
